﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Sample01_Base
{
    public partial class MainPage : UserControl
    {
        int index = 3;
        public MainPage()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= MainPage_Loaded;
            FrameworkElement test = null;
            switch (index)
            {
                case 1:
                    //标准图片，通过网络加载
                    test = new Sample_1();
                    break;
                case 2:
                    //事件物体移动等
                    test = new Sample_2();
                    break;
                case 3:
                    //热键
                    test = new Sample_3();
                    break;
                default:
                    break;
            }
            LayoutRoot.Children.Add(test);
        }
        
    }
}
